package com.aspose.cells;

import java.util.ArrayList;

class zccv {
   private zcda a;
   private Workbook b;
   private zoz c;
   private WorksheetCollection d;
   private zbxz e;
   private PivotTable f;
   private int g;
   private byte[] h;
   private int i;
   private ArrayList j;
   private zpa k;
   private Worksheet l;

   zccv(zcda var1) {
      this.a = var1;
      this.b = var1.a;
      this.c = var1.b;
      this.j = new ArrayList();
   }

   void a(zpa var1, zbxz var2) throws Exception {
      this.e = var2;
      this.k = var1;
      this.l = var1.d;
      this.d = var1.d.c();
      this.f = new PivotTable(this.l.getPivotTables());
      this.f.s = true;
      this.l.getPivotTables().a(this.f);

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 280:
            this.a();
            break;
         case 285:
            this.c();
            break;
         case 289:
            this.f();
            break;
         case 293:
            this.g();
            break;
         case 299:
            this.h();
            break;
         case 301:
            this.i();
            break;
         case 303:
            this.m();
            break;
         case 309:
            this.d();
            break;
         case 311:
            this.e();
            break;
         case 314:
            this.b();
            break;
         case 315:
            this.e.a(1L);
            this.f.s = true;
            return;
         case 513:
            this.j();
            break;
         case 558:
            this.b(this.f.getPivotFormatConditions());
            break;
         case 601:
            this.k();
            break;
         case 1062:
            this.l();
            break;
         case 1147:
            this.a(this.f.getPivotFormatConditions());
            break;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private boolean a() throws Exception {
      this.h = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      int var2 = com.aspose.cells.b.a.zc.a(this.h, 4);
      int var3 = com.aspose.cells.b.a.zc.a(this.h, 8);
      this.f.setDisplayImmediateItems(((var1 & 3840) >> 8 & 1) != 0);
      this.f.O = ((var1 & 3840) >> 8 & 2) != 0;
      this.f.setEnableFieldList(((var1 & 3840) >> 8 & 4) == 0);
      this.f.setShowDrill(((var1 & 15728640) >> 20 & 1) == 0);
      this.f.setPrintDrill(((var1 & 15728640) >> 20 & 2) != 0);
      this.f.H = ((var1 & 15728640) >> 20 & 4) != 0;
      this.f.setShowDataTips(((var1 & 15728640) >> 20 & 8) == 0);
      this.f.C = (var1 & 2130706432) >> 24;
      this.f.setShowRowHeaderCaption((((long)var1 & 2147483648L) >> 31 & 1L) == 0L);
      this.f.setShowEmptyRow((var2 & 15 & 4) != 0);
      this.f.setShowEmptyCol((var2 & 15 & 8) != 0);
      this.f.setEnableWizard(((var2 & 240) >> 4 & 1) != 0);
      this.f.setEnableDrilldown(((var2 & 240) >> 4 & 2) != 0);
      this.f.setEnableFieldDialog(((var2 & 240) >> 4 & 4) != 0);
      this.f.setPreserveFormatting(((var2 & 240) >> 4 & 8) != 0);
      this.f.setAutoFormat(((var2 & 3840) >> 8 & 1) != 0);
      this.f.setDisplayErrorString(((var2 & 3840) >> 8 & 2) != 0);
      this.f.setDisplayNullString(((var2 & 3840) >> 8 & 4) != 0);
      this.f.setPageFieldOrder(((var2 & 3840) >> 8 & 8) != 0 ? 1 : 0);
      this.f.setSubtotalHiddenPageItems(((var2 & '\uf000') >> 12 & 1) != 0);
      this.f.setColumnGrand(((var2 & '\uf000') >> 12 & 2) != 0);
      this.f.setRowGrand(((var2 & '\uf000') >> 12 & 4) != 0);
      this.f.setPrintTitles(((var2 & '\uf000') >> 12 & 8) != 0);
      this.f.setItemPrintTitles(((var2 & 983040) >> 16 & 2) != 0);
      this.f.setMergeLabels(((var2 & 983040) >> 16 & 4) != 0);
      boolean var4 = ((var2 & 983040) >> 16 & 8) != 0;
      boolean var5 = ((var2 & 15728640) >> 20 & 1) != 0;
      boolean var6 = ((var2 & 15728640) >> 20 & 2) != 0;
      boolean var7 = ((var2 & 15728640) >> 20 & 4) != 0;
      boolean var8 = ((var2 & 15728640) >> 20 & 8) != 0;
      boolean var9 = (((long)var2 & 4026531840L) >> 28 & 4L) != 0L;
      this.f.u = (var3 & 15 & 1) != 0;
      this.f.w = (var3 & 15 & 2) != 0;
      this.f.x = (var3 & 15 & 4) != 0;
      this.f.v = (var3 & 15 & 8) != 0;
      this.f.t = ((var3 & 240) >> 4 & 1) == 0;
      boolean var10 = ((var3 & 240) >> 4 & 4) == 0;
      boolean var11 = ((var3 & 240) >> 4 & 8) == 0;
      boolean var12 = ((var3 & 3840) >> 8 & 4) != 0;
      boolean var13 = ((var3 & 3840) >> 8 & 8) != 0;
      this.f.setMultipleFieldFilters(((var3 & 3840) >> 8 & 2) == 0);
      this.f.setFieldListSortAscending(((var3 & 4096) >> 12 & 1) != 0);
      this.f.setCustomListSort((var3 & 16384) >> 12 == 0);
      this.f.setPageFieldWrapCount(this.h[13]);
      this.f.y = true;
      this.f.A = true;
      this.f.B = this.h[14] & 255;
      this.f.z = this.h[14] & 255;
      short var14 = com.aspose.cells.b.a.zc.b(this.h, 20);
      this.f.setAutoFormatType(zase.Y(var14));
      this.f.aa = com.aspose.cells.b.a.zc.a(this.h, 28);
      byte var15 = 32;
      int[] var16 = new int[]{var15};
      this.f.b.g = zcch.a(this.h, var16);
      int var18 = var16[0];
      if (var4) {
         var16 = new int[]{var18};
         this.f.b.h = zcch.a(this.h, var16);
         var18 = var16[0];
      }

      if (var5) {
         var16 = new int[]{var18};
         zcch.a(this.h, var16);
         var18 = var16[0];
      }

      if (var10) {
         var16 = new int[]{var18};
         this.f.setErrorString(zcch.a(this.h, var16));
         var18 = var16[0];
      }

      if (var11) {
         var16 = new int[]{var18};
         this.f.setNullString(zcch.a(this.h, var16));
         var18 = var16[0];
      }

      if (var6) {
         var16 = new int[]{var18};
         zcch.a(this.h, var16);
         var18 = var16[0];
      }

      if (var7) {
         var16 = new int[]{var18};
         this.f.setPivotTableStyleName(zcch.a(this.h, var16));
         var18 = var16[0];
      }

      if (var8) {
         var16 = new int[]{var18};
         zcch.a(this.h, var16);
         var18 = var16[0];
      }

      if (var9) {
         var16 = new int[]{var18};
         this.f.setTag(zcch.a(this.h, var16));
         var18 = var16[0];
      }

      if (var13) {
         var16 = new int[]{var18};
         this.f.setColumnHeaderCaption(zcch.a(this.h, var16));
         var18 = var16[0];
      }

      if (var12) {
         var16 = new int[]{var18};
         this.f.setRowHeaderCaption(zcch.a(this.h, var16));
         var18 = var16[0];
      }

      return true;
   }

   private void b() {
      this.h = this.a.a(this.e);
      this.f.i = com.aspose.cells.b.a.zc.a(this.h, 0);
      this.f.j = com.aspose.cells.b.a.zc.a(this.h, 4);
      this.f.k = com.aspose.cells.b.a.zc.a(this.h, 8);
      this.f.l = com.aspose.cells.b.a.zc.a(this.h, 12);
      this.f.m = com.aspose.cells.b.a.zc.a(this.h, 16);
      this.f.n = com.aspose.cells.b.a.zc.a(this.h, 20);
      this.f.o = com.aspose.cells.b.a.zc.a(this.h, 24);
   }

   private void c() throws Exception {
      PivotField var1 = new PivotField(this.f.getBaseFields());
      var1.l = this.f;
      var1.t = this.f.getBaseFields().getCount();
      if (this.f.d != null && this.f.d.p != null && var1.t < this.f.d.p.size()) {
         var1.h = (zbqs)this.f.d.p.get(this.f.getBaseFields().getCount());
      }

      var1.setShowInOutlineForm(true);
      var1.setShowCompact(true);
      var1.setShowSubtotalAtTop(true);
      var1.setShowAllItems(true);
      this.f.getBaseFields().a(var1);
      this.h = this.a.a(this.e);
      int var2 = this.h[0] & 255 & 15;
      var1.a((this.h[0] & 255 & 8) != 0);
      if ((var2 & 1) != 0) {
         var1.m = 1;
      } else if ((var2 & 2) != 0) {
         var1.m = 2;
      } else if ((var2 & 4) != 0) {
         var1.m = 4;
      } else if ((var2 & 8) != 0) {
         var1.m = 8;
      }

      int var3 = com.aspose.cells.b.a.zc.a(this.h, 4);
      var1.c.d = (short)var3;
      var1.c.e = this.d.h(var1.c.d);
      short var4 = com.aspose.cells.b.a.zc.b(this.h, 1);
      if ((var4 & 1) == 0 && (!var1.h() || var1.m != 8)) {
         var1.setSubtotals(0, true);
      }

      byte var5 = this.h[3];
      var1.setShowCompact((var5 & 255 & 16) != 0);
      var1.p = (var5 & 255 & 128) != 0;
      short var6 = com.aspose.cells.b.a.zc.b(this.h, 8);
      var1.setDragToRow((var6 & 1) != 0);
      var1.setDragToColumn((var6 & 2) != 0);
      var1.setDragToPage((var6 & 4) != 0);
      var1.setDragToHide((var6 & 8) != 0);
      var1.setDragToData((var6 & 16) != 0);
      var1.setShowAllItems((var6 & 32) != 0);
      var1.setShowInOutlineForm((var6 & 64) != 0);
      var1.setInsertBlankRow((var6 & 128) != 0);
      var1.setShowSubtotalAtTop((var6 & 256) != 0);
      var1.setInsertPageBreaksBetweenItems((var6 & 2048) != 0);
      var1.setAscendSort((var6 & 8192) != 0);
      var1.setAutoSort((var6 & 4096) != 0);
      var1.setAutoShow((var6 & 16384) != 0);
      var1.setAscendShow((var6 & '耀') != 0);
      short var7 = com.aspose.cells.b.a.zc.b(this.h, 10);
      var1.setIncludeNewItemsInFilter((var7 & 4) == 0);
      var1.setMultipleItemSelectionAllowed((var7 & 8) != 0);
      byte var8 = 20;
      int[] var9 = new int[]{var8};
      var1.setDisplayName(zcch.a(this.h, var9));
      int var10 = var9[0];

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 282:
            this.a(var1);
            break;
         case 286:
            this.e.a(1L);
            return;
         case 459:
            this.h = this.a.a(this.e);
            var1.e = new zbro();
            this.b(var1.e);
            break;
         case 1061:
            this.b(var1);
            break;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private void a(PivotField var1) throws Exception {
      this.h = this.a.a(this.e);
      byte var2 = this.h[0];
      if (var2 != 0) {
         if (var2 == 1) {
            return;
         }

         var1.setSubtotals(zcee.a(var2), true);
      }

      PivotItem var3 = new PivotItem(var1.getPivotItems());
      var1.getPivotItems().a(var3);
      short var4 = com.aspose.cells.b.a.zc.b(this.h, 1);
      var3.setHidden((var4 & 1) != 0);
      var3.a((var4 & 2) != 0);
      var3.b((var4 & 4) != 0);
      var3.c((var4 & 8) != 0);
      var3.g = (var4 & 32) != 0;
      var3.f = (var4 & 64) != 0;
      var3.setIndex(com.aspose.cells.b.a.zc.a(this.h, 3));
      byte var5 = 7;
      int[] var6 = new int[]{var5};
      var3.d = zcch.a(this.h, var6);
      int var7 = var6[0];
   }

   private void d() {
      this.h = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      PivotFieldCollection var2 = this.f.getRowFields();
      int var3 = 4;

      for(int var4 = 0; var4 < var1; ++var4) {
         int var5 = com.aspose.cells.b.a.zc.a(this.h, var3);
         if (var5 == -2) {
            this.f.f = new PivotField(this.f, this.f.getDataFields());
            this.f.f.t = -2;
            this.f.f.m = 1;
            var2.a(this.f.getDataField());
         } else {
            PivotField var6 = this.f.getBaseFields().get(var5);
            var6.t = var5;
            var2.a(var6);
         }

         var3 += 4;
      }

   }

   private void e() {
      this.h = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      PivotFieldCollection var2 = this.f.getColumnFields();
      int var3 = 4;

      for(int var4 = 0; var4 < var1; ++var4) {
         int var5 = com.aspose.cells.b.a.zc.a(this.h, var3);
         if (var5 == -2) {
            this.f.f = new PivotField(this.f, this.f.getDataFields());
            this.f.f.t = -2;
            this.f.f.m = 2;
            var2.a(this.f.getDataField());
         } else {
            PivotField var6 = this.f.getBaseFields().get(var5);
            var6.t = var5;
            var2.a(var6);
         }

         var3 += 4;
      }

   }

   private void f() throws Exception {
      this.h = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      PivotField var2 = this.f.getBaseFields().get(var1);
      this.f.getPageFields().a(var2);
      var2.i = new zbqn();
      var2.j = new zbrl(var2);
      zbqn var3 = var2.i;
      var2.t = var1;
      int var4 = com.aspose.cells.b.a.zc.a(this.h, 4);
      if (var4 != 1048830) {
         var2.j.b = (short)var4;
         var2.j.c = var2.d.get(var4).getIndex();
      }

      var2.j.d = com.aspose.cells.b.a.zc.a(this.h, 8);
      byte var5 = this.h[12];
      int var6 = 13;
      int[] var7;
      if ((var5 & 255 & 1) == 1) {
         var7 = new int[]{var6};
         var2.j.f = zcch.a(this.h, var7);
         var6 = var7[0];
      }

      if ((var5 & 255 & 2) != 0) {
         var7 = new int[]{var6};
         var2.j.e = zcch.a(this.h, var7);
         var6 = var7[0];
      }

   }

   private void g() throws Exception {
      this.h = this.a.a(this.e);
      PivotFieldCollection var1 = this.f.getDataFields();
      PivotField var2 = new PivotField();
      var2.a = var1;
      var2.a(var1.getCount());
      var1.a(var2);
      int var3 = com.aspose.cells.b.a.zc.a(this.h, 0);
      var2.k = this.f.getBaseFields().get(var3);
      var2.a(true);
      zbqn var4 = var2.i = new zbqn();
      var4.h = var2;
      switch(this.h[4]) {
      case 0:
         var4.a = 0;
         break;
      case 1:
         var4.a = 1;
         break;
      case 2:
         var4.a = 2;
         break;
      case 3:
         var4.a = 3;
         break;
      case 4:
         var4.a = 4;
         break;
      case 5:
         var4.a = 5;
         break;
      case 6:
         var4.a = 6;
         break;
      case 7:
         var4.a = 7;
         break;
      case 8:
         var4.a = 8;
         break;
      case 9:
         var4.a = 9;
         break;
      case 10:
         var4.a = 10;
      }

      var4.b = this.h[8] & 255;
      var4.c = com.aspose.cells.b.a.zc.a(this.h, 12);

      try {
         var4.d = com.aspose.cells.b.a.zc.a(this.h, 16);
      } catch (Exception var7) {
         var4.d = 0;
      }

      var4.e = (short)com.aspose.cells.b.a.zc.a(this.h, 20);
      var4.f = this.d.h(var4.e);
      byte var5 = 25;
      if (this.h[24] == 1) {
         int[] var6 = new int[]{var5};
         var4.g = zcch.a(this.h, var6);
         int var8 = var6[0];
      }

      if (this.f.getDataField() != null) {
         PivotItem var9 = new PivotItem(this.f.f.d);
         this.f.f.d.a(var9);
         var9.setIndex(this.f.getDataFields().getCount() - 1);
         var9.e = var2;
      }

   }

   private void h() {
      this.h = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      ArrayList var2 = null;
      boolean var3 = false;
      this.f.g = var2 = new ArrayList(var1);
      int var12 = 4 + this.f.getRowFields().getCount();

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 297:
            int[] var4 = new int[var12];

            for(int var5 = 4; var5 < var12; ++var5) {
               var4[var5] = 32767;
            }

            com.aspose.cells.b.a.a.ze.a(var2, (Object)var4);
            if (this.f.getDataField() != null && this.f.getDataField().m == 1) {
               var4[3] |= 4096;
            }

            this.h = this.a.a(this.e);
            short var13 = com.aspose.cells.b.a.zc.b(this.h, 0);
            short var6 = com.aspose.cells.b.a.zc.b(this.h, 2);
            int var7 = com.aspose.cells.b.a.zc.a(this.h, 8);
            var4[3] |= var7 << 1;
            var4[1] = var6;
            if (var6 == 13) {
               var4[3] |= 2560;
               if (this.f.getBaseFields().b() > 1) {
                  var4[3] |= 1;
               }
            } else if (var6 == 14) {
               var4[3] = 8192;
            } else if (var6 == 1) {
               var4[3] |= 512;
            }

            if (var6 != 1) {
               for(int var8 = 4; var8 < var12; ++var8) {
                  var4[var8] = 0;
               }
            }

            var4[0] = var13;
            if (var13 > 0) {
               ArrayList var14 = null;
               Object var9 = null;
               var14 = this.f.g;
               int var10 = var14.size();
               int[] var15;
               if (var10 > 1) {
                  var15 = (int[])((int[])var14.get(var10 - 2));
               } else {
                  var15 = (int[])((int[])var14.get(var10 - 1));
               }

               for(int var11 = 0; var11 < var13; ++var11) {
                  var4[4 + var11] = var15[4 + var11];
               }
            }

            this.a(var4, var13);
            break;
         case 300:
            this.e.a(1L);
            return;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private void a(int[] var1, int var2) {
      int var3 = 4;
      int var4 = 0;
      int var5 = var1[0];

      label19:
      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 298:
            this.e.a(1L);
            return;
         case 388:
            this.h = this.a.a(this.e);
            int var6 = this.h.length / 4;
            int var7 = 0;
            int var8 = 0;

            while(true) {
               if (var8 >= var6) {
                  continue label19;
               }

               var1[var3 + var5] = com.aspose.cells.b.a.zc.a(this.h, var7);
               var7 += 4;
               ++var3;
               ++var4;
               ++var8;
            }
         case 389:
            var1[2] = var4 + var5;
            this.e.a(1L);
            return;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private void i() {
      this.h = this.a.a(this.e);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      ArrayList var2 = null;
      boolean var3 = false;
      this.f.h = var2 = new ArrayList(var1);
      int var12 = 4 + this.f.getColumnFields().getCount();

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 297:
            int[] var4 = new int[var12];

            for(int var5 = 4; var5 < var12; ++var5) {
               var4[var5] = 32767;
            }

            com.aspose.cells.b.a.a.ze.a(var2, (Object)var4);
            if (this.f.getDataField() != null && this.f.getDataField().m == 2) {
               var4[3] |= 4096;
            }

            this.h = this.a.a(this.e);
            short var13 = com.aspose.cells.b.a.zc.b(this.h, 0);
            short var6 = com.aspose.cells.b.a.zc.b(this.h, 2);
            int var7 = com.aspose.cells.b.a.zc.a(this.h, 8);
            var4[3] |= var7 << 1;
            var4[1] = var6;
            if (var6 == 13) {
               var4[3] |= 2560;
               if (this.f.getBaseFields().b() > 1) {
                  var4[3] |= 1;
               }
            } else if (var6 == 14) {
               var4[3] = 8192;
            } else if (var6 == 1) {
               var4[3] |= 512;
            }

            if (var6 != 1) {
               for(int var8 = 4; var8 < var12; ++var8) {
                  var4[var8] = 0;
               }
            }

            var4[0] = var13;
            if (var13 > 0) {
               ArrayList var14 = null;
               Object var9 = null;
               var14 = this.f.g;
               int var10 = var14.size();
               int[] var15;
               if (var10 > 1) {
                  var15 = (int[])((int[])var14.get(var10 - 2));
               } else {
                  var15 = (int[])((int[])var14.get(var10 - 1));
               }

               for(int var11 = 0; var11 < var13; ++var11) {
                  var4[4 + var11] = var15[4 + var11];
               }
            }

            this.a(var4, var13);
            break;
         case 302:
            this.e.a(1L);
            return;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private void j() throws Exception {
      this.h = this.a.a(this.e);
      byte var1 = this.h[0];
      this.f.setShowPivotStyleLastColumn((var1 & 255 & 2) != 0);
      this.f.setShowPivotStyleRowStripes((var1 & 255 & 4) != 0);
      this.f.setShowPivotStyleColumnStripes((var1 & 255 & 8) != 0);
      this.f.setShowPivotStyleRowHeader((var1 & 255 & 16) != 0);
      this.f.setShowPivotStyleColumnHeader((var1 & 255 & 32) != 0);
      byte var2 = 2;
      int[] var3 = new int[]{var2};
      this.f.setPivotTableStyleName(zcch.a(this.h, var3));
      int var4 = var3[0];
   }

   private void k() throws Exception {
      this.h = this.a.a(this.e);
      PivotFilter var1 = new PivotFilter(this.l);
      this.f.ai.a(var1);
      var1.a = com.aspose.cells.b.a.zc.a(this.h, 0);
      var1.i = com.aspose.cells.b.a.zc.a(this.h, 4);
      int var2 = com.aspose.cells.b.a.zc.a(this.h, 8);
      var1.b = zcee.J(var2);
      var1.e = com.aspose.cells.b.a.zc.a(this.h, 12);
      var1.c = com.aspose.cells.b.a.zc.a(this.h, 16);
      var1.d = com.aspose.cells.b.a.zc.a(this.h, 20);
      byte var3 = this.h[28];
      boolean var4 = (var3 & 255 & 1) != 0;
      boolean var5 = (var3 & 255 & 4) != 0;
      boolean var6 = (var3 & 255 & 8) != 0;
      int var7 = 30;
      int[] var8;
      if (var4) {
         var8 = new int[]{var7};
         var1.j = zcch.a(this.h, var8);
         var7 = var8[0];
      }

      if (var5) {
         var8 = new int[]{var7};
         var1.g = zcch.a(this.h, var8);
         var7 = var8[0];
      }

      if (var6) {
         var8 = new int[]{var7};
         var1.h = zcch.a(this.h, var8);
         var7 = var8[0];
      }

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 161:
            this.a(var1.f);
            break;
         case 602:
            for(int var11 = 0; var11 < var1.f.e.getCount(); ++var11) {
               FilterColumn var9 = var1.f.e.get(var11);
               if (var9.getFilterType() == 5) {
                  PivotField var10 = this.f.getBaseFields().get(var1.a);
                  var10.f = ((Top10Filter)var9.getFilter()).getItems();
               }
            }

            this.e.a(1L);
            return;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private void b(PivotField var1) {
      this.h = this.a.a(this.e);
      var1.setRepeatItemLabels((this.h[4] & 255 & 1) != 0);
   }

   private void l() throws Exception {
      this.h = this.a.a(this.e);
      this.f.J = (this.h[4] & 255 & 16) == 0;
      this.f.setEnableDataValueEditing((this.h[4] & 255 & 4) != 0);
      byte var1 = 9;
      int[] var2 = new int[]{var1};
      this.f.setAltTextTitle(zcch.a(this.h, var2));
      int var3 = var2[0];
      var2[0] = var3;
      this.f.setAltTextDescription(zcch.a(this.h, var2));
      var3 = var2[0];
   }

   private void a(AutoFilter var1) throws Exception {
      this.h = this.a.a(this.e);
      Name var2 = this.b.getWorksheets().getNames().a("_FILTERDATABASE", this.l.getIndex());
      if (var2 != null) {
         var1.a(var2);
      }

      int var3 = com.aspose.cells.b.a.zc.a(this.h, 0);
      int var4 = com.aspose.cells.b.a.zc.a(this.h, 4);
      int var5 = com.aspose.cells.b.a.zc.a(this.h, 8);
      int var6 = com.aspose.cells.b.a.zc.a(this.h, 12);
      var1.setRange(var3, var5, var6);

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 162:
            this.e.a(1L);
            return;
         case 163:
            this.b(var1);
            break;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private void b(AutoFilter var1) throws Exception {
      this.h = this.a.a(this.e);
      int var2 = com.aspose.cells.b.a.zc.a(this.h, 0);
      boolean var3 = (this.h[4] & 255 & 1) == 1;
      boolean var4 = (this.h[4] & 255 & 2) == 0;
      FilterColumn var5 = null;

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 164:
            this.e.a(1L);
            if (var5 != null) {
               var1.e.a(var5);
            }

            return;
         case 165:
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(3);
            MultipleFilterCollection var26 = new MultipleFilterCollection();
            var5.setFilter(var26);
            this.a(var26);
            break;
         case 166:
         case 167:
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
            break;
         case 168:
            this.h = this.a.a(this.e);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(0);
            ColorFilter var22 = new ColorFilter(var5);
            var5.setFilter(var22);
            var22.setFilterByFillColor(this.h[4] == 1);
            var22.a(com.aspose.cells.b.a.zc.a(this.h, 0));
            break;
         case 169:
            this.h = this.a.a(this.e);
            int var23 = com.aspose.cells.b.a.zc.a(this.h, 0);
            int var24 = com.aspose.cells.b.a.zc.a(this.h, 4);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(4);
            IconFilter var25 = new IconFilter(var5);
            var5.setFilter(var25);
            var25.setIconSetType(zcee.q(var23));
            var25.setIconId(var24);
            break;
         case 170:
            this.h = this.a.a(this.e);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(5);
            boolean var13 = (this.h[0] & 255 & 1) != 0;
            boolean var14 = (this.h[0] & 255 & 2) != 0;
            boolean var15 = (this.h[0] & 255 & 4) != 0;
            double var16 = com.aspose.cells.b.a.zc.f(this.h, 1);
            double var18 = com.aspose.cells.b.a.zc.f(this.h, 9);
            int var20 = 10;
            if (var15) {
               var20 = (int)var16;
            }

            Top10Filter var21 = new Top10Filter(var13, var14, var20);
            var5.setFilter(var21);

            try {
               var21.setCriteria(var18);
            } catch (Exception var28) {
               ;
            }
            break;
         case 171:
            this.h = this.a.a(this.e);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(2);
            DynamicFilter var6 = new DynamicFilter();
            var5.setFilter(var6);
            int var7 = com.aspose.cells.b.a.zc.a(this.h, 0);
            var6.setDynamicFilterType(zcee.t(var7));
            boolean var8 = this.h[4] == 1;
            double var9 = com.aspose.cells.b.a.zc.f(this.h, 5);
            double var11 = com.aspose.cells.b.a.zc.f(this.h, 13);
            if (var8) {
               var6.setMaxValue(var11);
            }

            var6.setValue(var9);
            break;
         case 172:
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(1);
            CustomFilterCollection var27 = new CustomFilterCollection();
            var5.setFilter(var27);
            this.a(var27);
         }
      }
   }

   private void a(CustomFilterCollection var1) throws Exception {
      this.h = this.a.a(this.e);
      boolean var2 = this.h[0] == 1;
      var1.setAnd(var2);

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 173:
            this.e.a(1L);
            return;
         case 174:
            this.h = this.a.a(this.e);
            byte var3 = this.h[0];
            byte var4 = this.h[1];
            CustomFilter var5 = new CustomFilter();
            var1.a(var5);
            var5.setFilterOperatorType(zcee.v(var4 & 255));
            if (var3 == 6) {
               String var6 = zcch.d(this.h, 10);
               var5.setCriteria(var6);
            } else {
               var5.setCriteria(com.aspose.cells.b.a.zc.f(this.h, 2));
            }
         }
      }
   }

   private void a(MultipleFilterCollection var1) throws Exception {
      this.h = this.a.a(this.e);
      boolean var2 = this.h[0] == 1;
      if (var2) {
         var1.setMatchBlank(true);
      }

      int var3 = com.aspose.cells.b.a.zc.a(this.h, 4);
      var1.b = zcee.s(var3);

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 166:
            this.e.a(1L);
            return;
         case 167:
            this.h = this.a.a(this.e);
            String var4 = zcch.d(this.h, 0);
            var1.b(var4);
            break;
         case 175:
            this.h = this.a.a(this.e);
            DateTimeGroupItem var5 = new DateTimeGroupItem();
            var1.a(var5);
            var5.setYear(com.aspose.cells.b.a.zc.b(this.h, 0));
            var5.setMonth(com.aspose.cells.b.a.zc.b(this.h, 2));
            var5.setDay(com.aspose.cells.b.a.zc.a(this.h, 4));
            var5.setHour(com.aspose.cells.b.a.zc.b(this.h, 8));
            var5.setMinute(com.aspose.cells.b.a.zc.b(this.h, 10));
            var5.setSecond(com.aspose.cells.b.a.zc.b(this.h, 12));
            var5.setDateTimeGroupingType(zcee.x(com.aspose.cells.b.a.zc.a(this.h, 20)));
            break;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }

   private void m() {
      this.h = this.a.a(this.e);
      zbqy var1 = new zbqy(this.f.ag);
      this.f.ag.a(var1);
      var1.a = this.h[0];
      var1.b = com.aspose.cells.b.a.zc.a(this.h, 2);
      this.b(var1.c);
   }

   private void a(PivotFormatConditionCollection var1) {
      this.h = this.a.a(this.e);
      int var2 = var1.a();
      PivotFormatCondition var3 = var1.get(var2);
      var3.d = zcee.L(com.aspose.cells.b.a.zc.a(this.h, 20));
      var3.e = zcee.N(com.aspose.cells.b.a.zc.a(this.h, 24));
      var3.c = com.aspose.cells.b.a.zc.a(this.h, 28);
      zbro var4 = new zbro();
      com.aspose.cells.b.a.a.ze.a(var3.b, (Object)var4);
      this.a(var4);
   }

   private void a(zbro var1) {
      zbqw var2 = null;

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 1161:
            this.h = this.a.a(this.e);
            var1.b = this.h[4];
            int var3 = com.aspose.cells.b.a.zc.a(this.h, 8);
            var1.b(this.h[8]);
            var1.a((var3 & 256) != 0);
            var1.b((var3 & 512) != 0);
            var1.c((var3 & 1024) != 0);
            var1.d((var3 & 2048) != 0);
            var1.e((var3 & 4096) != 0);
            var1.f((var3 & 8192) != 0);
            var1.h((var3 & 16384) != 0);
            var1.g((var3 & '耀') != 0);
            var1.a((byte)(this.h[10] & 255 & 15));
            var1.a = (byte)((this.h[10] & 255 & 240) >> 4 + (this.h[11] & 255) & 15);
            if (var1.j() && this.h.length == 28) {
               var1.f = this.h[12];
               var1.g = this.h[16];
               var1.h = this.h[20];
               var1.i = this.h[24];
            }
            break;
         case 1162:
            this.e.a(1L);
            return;
         case 1163:
         case 1164:
         case 1166:
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
            break;
         case 1165:
            this.h = this.a.a(this.e);
            var2 = new zbqw();
            com.aspose.cells.b.a.a.ze.a(var1.e, (Object)var2);
            var2.b(com.aspose.cells.b.a.zc.a(this.h, 4));
            short var4 = com.aspose.cells.b.a.zc.b(this.h, 12);
            var2.q = (var4 & 1) == 0;
            var2.e = (var4 & 2) != 0;
            var2.f = (var4 & 4) != 0;
            var2.g = (var4 & 8) != 0;
            var2.h = (var4 & 16) != 0;
            var2.i = (var4 & 32) != 0;
            var2.j = (var4 & 64) != 0;
            var2.k = (var4 & 128) != 0;
            var2.l = (var4 & 256) != 0;
            var2.m = (var4 & 512) != 0;
            var2.n = (var4 & 1024) != 0;
            var2.o = (var4 & 2048) != 0;
            var2.p = (var4 & 4096) != 0;
            var2.a((this.h[14] & 255 & 1) != 0);
            break;
         case 1167:
            this.h = this.a.a(this.e);
            if (var2.c == null) {
               var2.c = new ArrayList();
            }

            com.aspose.cells.b.a.a.ze.a(var2.c, (Object)com.aspose.cells.b.a.zc.a(this.h, 4));
         }
      }
   }

   private void b(PivotFormatConditionCollection var1) {
      this.h = this.a.a(this.e);
      int var2 = var1.a();
      PivotFormatCondition var3 = var1.get(var2);
      var3.d = zcee.L(com.aspose.cells.b.a.zc.a(this.h, 0));
      var3.e = zcee.N(com.aspose.cells.b.a.zc.a(this.h, 4));
      var3.c = com.aspose.cells.b.a.zc.a(this.h, 8);
      zbro var4 = new zbro();
      com.aspose.cells.b.a.a.ze.a(var3.b, (Object)var4);
      this.b(var4);
   }

   private void b(zbro var1) {
      zbqw var2 = null;

      while(true) {
         this.g = this.e.a();
         switch(this.g) {
         case 247:
            this.h = this.a.a(this.e);
            var1.b = this.h[0];
            int var3 = com.aspose.cells.b.a.zc.a(this.h, 4);
            var1.b(this.h[4]);
            var1.a((var3 & 256) != 0);
            var1.b((var3 & 512) != 0);
            var1.c((var3 & 1024) != 0);
            var1.d((var3 & 2048) != 0);
            var1.e((var3 & 4096) != 0);
            var1.f((var3 & 8192) != 0);
            var1.h((var3 & 16384) != 0);
            var1.g((var3 & '耀') != 0);
            var1.a((byte)(this.h[6] & 255 & 15));
            var1.a = (byte)((this.h[6] & 255 & 240) >> 4 + (this.h[7] & 255) & 15);
            if (var1.j() && this.h.length == 24) {
               var1.f = this.h[8];
               var1.g = this.h[12];
               var1.h = this.h[16];
               var1.i = this.h[20];
            }
            break;
         case 248:
            this.e.a(1L);
            return;
         case 251:
            this.h = this.a.a(this.e);
            var2 = new zbqw();
            com.aspose.cells.b.a.a.ze.a(var1.e, (Object)var2);
            var2.b(com.aspose.cells.b.a.zc.a(this.h, 0));
            short var4 = com.aspose.cells.b.a.zc.b(this.h, 8);
            var2.q = (var4 & 1) == 0;
            var2.e = (var4 & 2) != 0;
            var2.f = (var4 & 4) != 0;
            var2.g = (var4 & 8) != 0;
            var2.h = (var4 & 16) != 0;
            var2.i = (var4 & 32) != 0;
            var2.j = (var4 & 64) != 0;
            var2.k = (var4 & 128) != 0;
            var2.l = (var4 & 256) != 0;
            var2.m = (var4 & 512) != 0;
            var2.n = (var4 & 1024) != 0;
            var2.o = (var4 & 2048) != 0;
            var2.p = (var4 & 4096) != 0;
            var2.a((this.h[10] & 255 & 1) != 0);
            break;
         case 382:
            this.h = this.a.a(this.e);
            if (var2.c == null) {
               var2.c = new ArrayList();
            }

            com.aspose.cells.b.a.a.ze.a(var2.c, (Object)com.aspose.cells.b.a.zc.a(this.h, 0));
            break;
         default:
            this.i = this.e.b();
            this.e.a((long)this.i);
         }
      }
   }
}
